import request from "@/request/index.js";

const auth = "auth"; //http://101.42.107.47:30019文档
const base = "base"; //http://101.42.107.47:30020文档
const zhpt = "zhpt"; //http://101.42.107.47:30018文档

//获取成果列表
export const getActivityListApi = (data) => {
    return request({
        url: `/api/${zhpt}/activity/console/search`,
        method: "post",
        data,
    });
};

//获取成果列表
export const getActivityMeetingDictApi = () => {
    return request({
        url: `/api/${zhpt}/activity/meeting/dict`,
        method: "get",
    });
};

//新增活动  
export const addActivityApi = (data) => {
    return request({
        url: `/api/${zhpt}/activity/add`,
        method: "post",
        data,
    });
};

//批量操作
export const batchActivityApi = (data) => {
    return request({
        url: `/api/${zhpt}/activity/batch`,
        method: "post",
        data,
    });
};

//编辑活动
export const editActivityApi = (data) => {
    return request({
        url: `/api/${zhpt}/activity/edit`,
        method: "post",
        data,
    });
};

//活动详情
export const activityDetailApi = (params) => {
    return request({
        url: `/api/${zhpt}/activity/search/info`,
        method: "get",
        params,
    });
};

//活动报名人员
export const activityPersonApi = (params) => {
    return request({
        url: `/api/${zhpt}/activity/apply/find`,
        method: "get",
        params,
    });
};

//科技活动报名人员信息导出
export const dowloadActivityPersonApi = (params) => {
    return request({
        url: `/api/${zhpt}/activity/apply/export`,
        method: 'GET',
        params,
        responseType: 'blob',
    })
}